package Example17;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println(translateNum(scanner.nextInt()));;
    }

    public static int translateNum(int num){
        if(num<0){
            return num;
        }
        String str=String.valueOf(num);
        int []preRes=new int[]{1,1};
        int flagIminus2 = 0;
        int flagIminus1 = 1;

        if(str.length()==1){
            return 1;
        }
        for(int i=1;i<str.length();i++){
            int res = 0;
            if(judge(str.charAt(i-1),str.charAt(i))){
                res = preRes[0] + preRes[1];
            }
            else{
                res = preRes[flagIminus1];
            }
            preRes[flagIminus2] = res;


            flagIminus2 = 1 - flagIminus2;
            flagIminus1 = 1 - flagIminus1;
        }
        return preRes[flagIminus1];
    }

    public static boolean judge(char a,char b){
        int intA = (a -'0') *10 + b-'0';
        if(intA>=10&&intA<=25){
            return true;
        }
        else{
            return false;
        }
    }
}
